hello world
a simple program to print hello world in terminal
import cliflect
console=cliflect.console()
@console.cmd('name')
def out(name):
if name:
console.echo(f"welcome, {name}")
else:
console.echo('please enter your name')
console.run()
i saved it as hello.py
at console
$ python hello.py
no options parsed
usage hello.py [option] args
options:
name
$ python hello.py test
invalid option --> test
usage hello.py [option] args
options:
name
$ python hello.py name
please enter your name
$ python hello.py name guest
welcome, guest